package au.chao.main;

abstract public class Person {

	private String FirstName;
	private String LastName;
	private String Sex;
	private int Age;
	private String ContactNumber;
	
	public Person(String fname, String lname){
		FirstName = fname;
		LastName = lname;
		Sex = "";
		Age = -1;
		ContactNumber = "";
	}
	Person(String fname, String lname, String sex, int age){
		FirstName = fname;
		LastName = lname;
		Sex = sex;
		Age = age;
	}
	public String getFullName(){
		return (FirstName + " " + LastName).trim();
	}
	public int getAge() {
		return Age;
	}
	public void setAge(int age) {
		Age = age;
	}
	public String getSex() {
		return Sex;
	}
	public void setSex(String sex) {
		Sex = sex;
	}
	public String getFirstName() {
		return FirstName;
	}
	public void setFirstName(String firstName) {
		FirstName = firstName;
	}
	public String getLastName() {
		return LastName;
	}
	public void setLastName(String lastName) {
		LastName = lastName;
	}

	public String getContactNumber() {
		return ContactNumber;
	}

	public void setContactNumber(String contactNumber) {
		ContactNumber = contactNumber;
	}
	
	public int hashCode(){
		return (getFullName() + Sex + Age).hashCode();
	}
	
}
